package demo06;

public class Demo01Multi {
    public static void main(String[] args) {
        Employee one = new Teacher(); // 多态写法
        Employee two = new Assistant();

        toWork(one); // 讲课...
        toWork(two); // 辅导...
    }

    public static void toWork(Employee e) { // 只需要接收一种类型
        e.work();
    }
}
